package ie.timalb.chess;

public class Movement {
	Location sourceLocation;
	Location destinyLocation;
	Piece piece;

	public Movement(Piece pieceToMove, Location sourceLoc, Location finalLoc) {
		setDestinyLocation(finalLoc);
		setSourceLocation(sourceLoc);
		setPiece(pieceToMove);
	}
	
	public Location getSourceLocation() {
		return sourceLocation;
	}

	public void setSourceLocation(Location sourceLocation) {
		this.sourceLocation = sourceLocation;
	}

	public Location getDestinyLocation() {
		return destinyLocation;
	}

	public void setDestinyLocation(Location destinyLocation) {
		this.destinyLocation = destinyLocation;
	}
	
	public Piece getPiece() {
		return piece;
	}

	public void setPiece(Piece piece) {
		this.piece = piece;
	}

	public MovementCompare compareLocations() 
	{
		MovementCompare result = new MovementCompare (this.getSourceLocation(), this.getDestinyLocation());
		return result;
	}
}
